package com.tvalition.web;

import com.tvalition.pojo.TestDropInfo;
import com.tvalition.pojo.TestParams;
import com.tvalition.valInterface.Vadilation1Group;
import com.tvalition.valInterface.Vadilation2Group;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author: LCG
 * @date: 2023-03-20 14:17:29
 * @description:
 **/
@RestController
public class VaditationController {

    /** 
     * @author: LCG
     * @date: 2023-03-20 14:42:03
     * @description:  测试检验的分组，加了校验组的话只会校验 给定组标识的数据
     * 只会校验 TestParams 中 添加了分组Vadilation2Group的字段，Vadilation2Group只是一个接口标识就是用来标注分组类型的
     */
    @RequestMapping("edit01")
    public void edit01(@RequestBody @Validated(Vadilation2Group.class) TestParams testDropInfo){

    }

    @RequestMapping("edit02")
    public void add(@RequestBody @Validated(Vadilation1Group.class) TestParams testDropInfo){

    }
}
